<?php
require_once "resource/auth.inc.php";
include "resource/layout/header.php";

$modulo = (isset($_GET['module'])) ? filter_var($_GET['module'], FILTER_SANITIZE_STRING) : 'main';
$modulo = ($modulo && in_array($modulo, $modulos)) ? $modulo : 'main';
?>
<body>
    <?php
    include "resource/layout/menu.php";
    $page = 'resource/layout/' . $modulo . '/' . $modulo . '.php';
    if (file_exists($page)) {
        include $page;
    }
    ?>
    <?php include "resource/layout/footer.php"; ?>
</body>
</html>